package cn.se.localstation.controller;

import cn.se.localstation.service.GeocodingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GeocodingController {
    @Autowired
    private GeocodingService geocodingService;

    @GetMapping("/getAddress")
    public String getAddress(@RequestParam double latitude, @RequestParam double longitude) {
        return geocodingService.getAddress(latitude, longitude);
    }
}
